export const formatDate = (date, fmt) => {
  const padLeft = (value) => `0${value}`.slice(-2);
  const num =5;
  mum=6;
  const obj = {
    "y": date.getFullYear(),
    "M": date.getMonth() + 1,
    "d": date.getDate(),
    "h": date.getHours(),
    "m": date.getMinutes(),
    "s": date.getSeconds()
  };

  return fmt.replace(/y|M|d|h|m|s/g, (match) => padLeft(obj[match]));
};
